<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/jquery-3.6.0.min.js"></script>
		<script type="text/javascript">
		$(function(){
			$.ajax({
				url: "http://10.64.149.30:8080/practice1/customerServlet?method=showAll&currentPage=2",
				method:"get",
				dataType: "json",
				success: function (result) {
					console.log(result.list);
					var list =result.list;
					$(list).each(function(index,value){
						var template=`
						<div class="p">
							<img src="`+d+`" style="width: 80px; height: 80px;/"><br/>
							<span>`+value.p_name+`</span>
							<span>`++`</span>
							<button>`++`</button>				
						</div>
						`
						$("#mydiv").append(template);

					})
				}
			});

		})
	
	</script>
	<style>
	#mydiv{
		width: 920px;
		margin: 10 auto;
	}	
	.p{
		width: 100px;
		margin: 0 5px;
		text-align: center;
		float: left;
	}
		</style>		
	</head>
	<body>
		<div id="mydiv">
			

		</div>
	</body>
</html>
